<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Caffe: caffe::Blob&lt; Dtype &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Caffe
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecaffe.html">caffe</a></li><li class="navelem"><a class="el" href="classcaffe_1_1Blob.html">Blob</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classcaffe_1_1Blob-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">caffe::Blob&lt; Dtype &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A wrapper around <a class="el" href="classcaffe_1_1SyncedMemory.html" title="Manages memory allocation and synchronization between the host (CPU) and device (GPU). ">SyncedMemory</a> holders serving as the basic computational unit through which <a class="el" href="classcaffe_1_1Layer.html" title="An interface for the units of computation which can be composed into a Net. ">Layer</a>s, <a class="el" href="classcaffe_1_1Net.html" title="Connects Layers together into a directed acyclic graph (DAG) specified by a NetParameter. ">Net</a>s, and <a class="el" href="classcaffe_1_1Solver.html" title="An interface for classes that perform optimization on Nets. ">Solver</a>s interact.  
 <a href="classcaffe_1_1Blob.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="blob_8hpp_source.html">blob.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a379df830aad9b3cae253e1ddb0863844"><td class="memItemLeft" align="right" valign="top"><a id="a379df830aad9b3cae253e1ddb0863844"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a379df830aad9b3cae253e1ddb0863844">Blob</a> (const int <a class="el" href="classcaffe_1_1Blob.html#a80ed3eddf98ffd408e9a627b1a7c2a9e">num</a>, const int <a class="el" href="classcaffe_1_1Blob.html#ae48c8e9f0a0b66b041e47bf37ed04471">channels</a>, const int <a class="el" href="classcaffe_1_1Blob.html#a18af535af43f4e9f85bd1e520886276f">height</a>, const int <a class="el" href="classcaffe_1_1Blob.html#afbdc067c69e6b9bd6880a73c13db2ec6">width</a>)</td></tr>
<tr class="memdesc:a379df830aad9b3cae253e1ddb0863844"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated; use <code>Blob(const vector&lt;int&gt;&amp; shape)</code>. <br /></td></tr>
<tr class="separator:a379df830aad9b3cae253e1ddb0863844"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2268ef004df012760d300465a28f0f68"><td class="memItemLeft" align="right" valign="top"><a id="a2268ef004df012760d300465a28f0f68"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Blob</b> (const vector&lt; int &gt; &amp;shape)</td></tr>
<tr class="separator:a2268ef004df012760d300465a28f0f68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0e0a9a4f49478e89161c6afe4e341a0"><td class="memItemLeft" align="right" valign="top"><a id="ad0e0a9a4f49478e89161c6afe4e341a0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#ad0e0a9a4f49478e89161c6afe4e341a0">Reshape</a> (const int <a class="el" href="classcaffe_1_1Blob.html#a80ed3eddf98ffd408e9a627b1a7c2a9e">num</a>, const int <a class="el" href="classcaffe_1_1Blob.html#ae48c8e9f0a0b66b041e47bf37ed04471">channels</a>, const int <a class="el" href="classcaffe_1_1Blob.html#a18af535af43f4e9f85bd1e520886276f">height</a>, const int <a class="el" href="classcaffe_1_1Blob.html#afbdc067c69e6b9bd6880a73c13db2ec6">width</a>)</td></tr>
<tr class="memdesc:ad0e0a9a4f49478e89161c6afe4e341a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated; use <code><a class="el" href="classcaffe_1_1Blob.html#ac9ce456aa623ff3f4d24225a0db14404" title="Change the dimensions of the blob, allocating new memory if necessary. ">Reshape(const vector&lt;int&gt;&amp; shape)</a></code>. <br /></td></tr>
<tr class="separator:ad0e0a9a4f49478e89161c6afe4e341a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9ce456aa623ff3f4d24225a0db14404"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#ac9ce456aa623ff3f4d24225a0db14404">Reshape</a> (const vector&lt; int &gt; &amp;shape)</td></tr>
<tr class="memdesc:ac9ce456aa623ff3f4d24225a0db14404"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the dimensions of the blob, allocating new memory if necessary.  <a href="#ac9ce456aa623ff3f4d24225a0db14404">More...</a><br /></td></tr>
<tr class="separator:ac9ce456aa623ff3f4d24225a0db14404"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a787ff5e31db6b53b70fb117002ec0385"><td class="memItemLeft" align="right" valign="top"><a id="a787ff5e31db6b53b70fb117002ec0385"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Reshape</b> (const BlobShape &amp;shape)</td></tr>
<tr class="separator:a787ff5e31db6b53b70fb117002ec0385"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8dee739aaa4253f73c44904784ce417"><td class="memItemLeft" align="right" valign="top"><a id="aa8dee739aaa4253f73c44904784ce417"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ReshapeLike</b> (const <a class="el" href="classcaffe_1_1Blob.html">Blob</a> &amp;other)</td></tr>
<tr class="separator:aa8dee739aaa4253f73c44904784ce417"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a868a4da9a750d6db6c25b40987fbfdc4"><td class="memItemLeft" align="right" valign="top"><a id="a868a4da9a750d6db6c25b40987fbfdc4"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><b>shape_string</b> () const</td></tr>
<tr class="separator:a868a4da9a750d6db6c25b40987fbfdc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95f030e56059c5bda665ef0fa88a69df"><td class="memItemLeft" align="right" valign="top"><a id="a95f030e56059c5bda665ef0fa88a69df"></a>
const vector&lt; int &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>shape</b> () const</td></tr>
<tr class="separator:a95f030e56059c5bda665ef0fa88a69df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a807f4da98e8e0d1f60badb1f540fe010"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a807f4da98e8e0d1f60badb1f540fe010">shape</a> (int index) const</td></tr>
<tr class="memdesc:a807f4da98e8e0d1f60badb1f540fe010"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the dimension of the index-th axis (or the negative index-th axis from the end, if index is negative).  <a href="#a807f4da98e8e0d1f60badb1f540fe010">More...</a><br /></td></tr>
<tr class="separator:a807f4da98e8e0d1f60badb1f540fe010"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2528ae4670a99e187366bbbbc51a8b2"><td class="memItemLeft" align="right" valign="top"><a id="aa2528ae4670a99e187366bbbbc51a8b2"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>num_axes</b> () const</td></tr>
<tr class="separator:aa2528ae4670a99e187366bbbbc51a8b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f8486dd22d1babd617651e6c328acec"><td class="memItemLeft" align="right" valign="top"><a id="a6f8486dd22d1babd617651e6c328acec"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>count</b> () const</td></tr>
<tr class="separator:a6f8486dd22d1babd617651e6c328acec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8674686a97c961b309b4420ead6626b5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a8674686a97c961b309b4420ead6626b5">count</a> (int start_axis, int end_axis) const</td></tr>
<tr class="memdesc:a8674686a97c961b309b4420ead6626b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the volume of a slice; i.e., the product of dimensions among a range of axes.  <a href="#a8674686a97c961b309b4420ead6626b5">More...</a><br /></td></tr>
<tr class="separator:a8674686a97c961b309b4420ead6626b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab573b2a70c26bf3b2ae65e42706003e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#aab573b2a70c26bf3b2ae65e42706003e">count</a> (int start_axis) const</td></tr>
<tr class="memdesc:aab573b2a70c26bf3b2ae65e42706003e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the volume of a slice spanning from a particular first axis to the final axis.  <a href="#aab573b2a70c26bf3b2ae65e42706003e">More...</a><br /></td></tr>
<tr class="separator:aab573b2a70c26bf3b2ae65e42706003e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad686f5ed9994046f2c741bfa81118509"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#ad686f5ed9994046f2c741bfa81118509">CanonicalAxisIndex</a> (int axis_index) const</td></tr>
<tr class="memdesc:ad686f5ed9994046f2c741bfa81118509"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the 'canonical' version of a (usually) user-specified axis, allowing for negative indexing (e.g., -1 for the last axis).  <a href="#ad686f5ed9994046f2c741bfa81118509">More...</a><br /></td></tr>
<tr class="separator:ad686f5ed9994046f2c741bfa81118509"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80ed3eddf98ffd408e9a627b1a7c2a9e"><td class="memItemLeft" align="right" valign="top"><a id="a80ed3eddf98ffd408e9a627b1a7c2a9e"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a80ed3eddf98ffd408e9a627b1a7c2a9e">num</a> () const</td></tr>
<tr class="memdesc:a80ed3eddf98ffd408e9a627b1a7c2a9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated legacy shape accessor num: use shape(0) instead. <br /></td></tr>
<tr class="separator:a80ed3eddf98ffd408e9a627b1a7c2a9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae48c8e9f0a0b66b041e47bf37ed04471"><td class="memItemLeft" align="right" valign="top"><a id="ae48c8e9f0a0b66b041e47bf37ed04471"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#ae48c8e9f0a0b66b041e47bf37ed04471">channels</a> () const</td></tr>
<tr class="memdesc:ae48c8e9f0a0b66b041e47bf37ed04471"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated legacy shape accessor channels: use shape(1) instead. <br /></td></tr>
<tr class="separator:ae48c8e9f0a0b66b041e47bf37ed04471"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18af535af43f4e9f85bd1e520886276f"><td class="memItemLeft" align="right" valign="top"><a id="a18af535af43f4e9f85bd1e520886276f"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a18af535af43f4e9f85bd1e520886276f">height</a> () const</td></tr>
<tr class="memdesc:a18af535af43f4e9f85bd1e520886276f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated legacy shape accessor height: use shape(2) instead. <br /></td></tr>
<tr class="separator:a18af535af43f4e9f85bd1e520886276f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbdc067c69e6b9bd6880a73c13db2ec6"><td class="memItemLeft" align="right" valign="top"><a id="afbdc067c69e6b9bd6880a73c13db2ec6"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#afbdc067c69e6b9bd6880a73c13db2ec6">width</a> () const</td></tr>
<tr class="memdesc:afbdc067c69e6b9bd6880a73c13db2ec6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated legacy shape accessor width: use shape(3) instead. <br /></td></tr>
<tr class="separator:afbdc067c69e6b9bd6880a73c13db2ec6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7457487517943ac970bea8c7a7b9b92f"><td class="memItemLeft" align="right" valign="top"><a id="a7457487517943ac970bea8c7a7b9b92f"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>LegacyShape</b> (int index) const</td></tr>
<tr class="separator:a7457487517943ac970bea8c7a7b9b92f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc31dcb34fd023452859158097a25216"><td class="memItemLeft" align="right" valign="top"><a id="adc31dcb34fd023452859158097a25216"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>offset</b> (const int n, const int c=0, const int h=0, const int w=0) const</td></tr>
<tr class="separator:adc31dcb34fd023452859158097a25216"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80ef3ebc7ec6eba712a07113d3cb4cd2"><td class="memItemLeft" align="right" valign="top"><a id="a80ef3ebc7ec6eba712a07113d3cb4cd2"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>offset</b> (const vector&lt; int &gt; &amp;indices) const</td></tr>
<tr class="separator:a80ef3ebc7ec6eba712a07113d3cb4cd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64ad51f99e88233f43a21a85ebe10284"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a64ad51f99e88233f43a21a85ebe10284">CopyFrom</a> (const <a class="el" href="classcaffe_1_1Blob.html">Blob</a>&lt; Dtype &gt; &amp;source, bool copy_diff=false, bool reshape=false)</td></tr>
<tr class="memdesc:a64ad51f99e88233f43a21a85ebe10284"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy from a source <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a>.  <a href="#a64ad51f99e88233f43a21a85ebe10284">More...</a><br /></td></tr>
<tr class="separator:a64ad51f99e88233f43a21a85ebe10284"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa1d03592e59bcf4b5626c49a031ccf3"><td class="memItemLeft" align="right" valign="top"><a id="aaa1d03592e59bcf4b5626c49a031ccf3"></a>
Dtype&#160;</td><td class="memItemRight" valign="bottom"><b>data_at</b> (const int n, const int c, const int h, const int w) const</td></tr>
<tr class="separator:aaa1d03592e59bcf4b5626c49a031ccf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af33d86470dcbb1a69962c211483d750a"><td class="memItemLeft" align="right" valign="top"><a id="af33d86470dcbb1a69962c211483d750a"></a>
Dtype&#160;</td><td class="memItemRight" valign="bottom"><b>diff_at</b> (const int n, const int c, const int h, const int w) const</td></tr>
<tr class="separator:af33d86470dcbb1a69962c211483d750a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d62c7cd07790e33521795f5630dff5a"><td class="memItemLeft" align="right" valign="top"><a id="a4d62c7cd07790e33521795f5630dff5a"></a>
Dtype&#160;</td><td class="memItemRight" valign="bottom"><b>data_at</b> (const vector&lt; int &gt; &amp;index) const</td></tr>
<tr class="separator:a4d62c7cd07790e33521795f5630dff5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a556b160ac52301c6e67c9f3ba8e7b2a8"><td class="memItemLeft" align="right" valign="top"><a id="a556b160ac52301c6e67c9f3ba8e7b2a8"></a>
Dtype&#160;</td><td class="memItemRight" valign="bottom"><b>diff_at</b> (const vector&lt; int &gt; &amp;index) const</td></tr>
<tr class="separator:a556b160ac52301c6e67c9f3ba8e7b2a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9a11d2d67856e54647cdf31a6248c18"><td class="memItemLeft" align="right" valign="top"><a id="ad9a11d2d67856e54647cdf31a6248c18"></a>
const shared_ptr&lt; <a class="el" href="classcaffe_1_1SyncedMemory.html">SyncedMemory</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>data</b> () const</td></tr>
<tr class="separator:ad9a11d2d67856e54647cdf31a6248c18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c5eced39d7bb4a41dd6f0fb1504a48e"><td class="memItemLeft" align="right" valign="top"><a id="a5c5eced39d7bb4a41dd6f0fb1504a48e"></a>
const shared_ptr&lt; <a class="el" href="classcaffe_1_1SyncedMemory.html">SyncedMemory</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>diff</b> () const</td></tr>
<tr class="separator:a5c5eced39d7bb4a41dd6f0fb1504a48e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a424c5d57df666249906bff01435b5f66"><td class="memItemLeft" align="right" valign="top"><a id="a424c5d57df666249906bff01435b5f66"></a>
const Dtype *&#160;</td><td class="memItemRight" valign="bottom"><b>cpu_data</b> () const</td></tr>
<tr class="separator:a424c5d57df666249906bff01435b5f66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d7d38b157e43ff6a8b8bf94b6815daf"><td class="memItemLeft" align="right" valign="top"><a id="a5d7d38b157e43ff6a8b8bf94b6815daf"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_cpu_data</b> (Dtype *data)</td></tr>
<tr class="separator:a5d7d38b157e43ff6a8b8bf94b6815daf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae505e5286e26e9493d99d177f7533e5a"><td class="memItemLeft" align="right" valign="top"><a id="ae505e5286e26e9493d99d177f7533e5a"></a>
const int *&#160;</td><td class="memItemRight" valign="bottom"><b>gpu_shape</b> () const</td></tr>
<tr class="separator:ae505e5286e26e9493d99d177f7533e5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65edecf195c052a6c92da8e4c01518d1"><td class="memItemLeft" align="right" valign="top"><a id="a65edecf195c052a6c92da8e4c01518d1"></a>
const Dtype *&#160;</td><td class="memItemRight" valign="bottom"><b>gpu_data</b> () const</td></tr>
<tr class="separator:a65edecf195c052a6c92da8e4c01518d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad350de479e172e963f02e8332c800bb7"><td class="memItemLeft" align="right" valign="top"><a id="ad350de479e172e963f02e8332c800bb7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_gpu_data</b> (Dtype *data)</td></tr>
<tr class="separator:ad350de479e172e963f02e8332c800bb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a136f86cd4557e307c43f330ca13db406"><td class="memItemLeft" align="right" valign="top"><a id="a136f86cd4557e307c43f330ca13db406"></a>
const Dtype *&#160;</td><td class="memItemRight" valign="bottom"><b>cpu_diff</b> () const</td></tr>
<tr class="separator:a136f86cd4557e307c43f330ca13db406"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14c3cfda68a4ca931aa05941289ffb22"><td class="memItemLeft" align="right" valign="top"><a id="a14c3cfda68a4ca931aa05941289ffb22"></a>
const Dtype *&#160;</td><td class="memItemRight" valign="bottom"><b>gpu_diff</b> () const</td></tr>
<tr class="separator:a14c3cfda68a4ca931aa05941289ffb22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac170c040c34e2e78e7fc0d2ee12cf0ef"><td class="memItemLeft" align="right" valign="top"><a id="ac170c040c34e2e78e7fc0d2ee12cf0ef"></a>
Dtype *&#160;</td><td class="memItemRight" valign="bottom"><b>mutable_cpu_data</b> ()</td></tr>
<tr class="separator:ac170c040c34e2e78e7fc0d2ee12cf0ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abac6bde0521e019df173213af6808e3b"><td class="memItemLeft" align="right" valign="top"><a id="abac6bde0521e019df173213af6808e3b"></a>
Dtype *&#160;</td><td class="memItemRight" valign="bottom"><b>mutable_gpu_data</b> ()</td></tr>
<tr class="separator:abac6bde0521e019df173213af6808e3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4eb870499aa659a5eee7af622cd92eca"><td class="memItemLeft" align="right" valign="top"><a id="a4eb870499aa659a5eee7af622cd92eca"></a>
Dtype *&#160;</td><td class="memItemRight" valign="bottom"><b>mutable_cpu_diff</b> ()</td></tr>
<tr class="separator:a4eb870499aa659a5eee7af622cd92eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d230bed098a5ee31559df0b8e2db252"><td class="memItemLeft" align="right" valign="top"><a id="a8d230bed098a5ee31559df0b8e2db252"></a>
Dtype *&#160;</td><td class="memItemRight" valign="bottom"><b>mutable_gpu_diff</b> ()</td></tr>
<tr class="separator:a8d230bed098a5ee31559df0b8e2db252"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe035d7b60c56e4aed2a18296e8ffdc5"><td class="memItemLeft" align="right" valign="top"><a id="afe035d7b60c56e4aed2a18296e8ffdc5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Update</b> ()</td></tr>
<tr class="separator:afe035d7b60c56e4aed2a18296e8ffdc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a95f882414ba0a11d674b134478476d"><td class="memItemLeft" align="right" valign="top"><a id="a0a95f882414ba0a11d674b134478476d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>FromProto</b> (const BlobProto &amp;proto, bool reshape=true)</td></tr>
<tr class="separator:a0a95f882414ba0a11d674b134478476d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adec156c0682f12c5bf0a3bf221c1a023"><td class="memItemLeft" align="right" valign="top"><a id="adec156c0682f12c5bf0a3bf221c1a023"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ToProto</b> (BlobProto *proto, bool write_diff=false) const</td></tr>
<tr class="separator:adec156c0682f12c5bf0a3bf221c1a023"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa06094adb9337a7d67f7049a1f2ede54"><td class="memItemLeft" align="right" valign="top"><a id="aa06094adb9337a7d67f7049a1f2ede54"></a>
Dtype&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#aa06094adb9337a7d67f7049a1f2ede54">asum_data</a> () const</td></tr>
<tr class="memdesc:aa06094adb9337a7d67f7049a1f2ede54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the sum of absolute values (L1 norm) of the data. <br /></td></tr>
<tr class="separator:aa06094adb9337a7d67f7049a1f2ede54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bf366edeb71ae6a76d4177fef3879ec"><td class="memItemLeft" align="right" valign="top"><a id="a1bf366edeb71ae6a76d4177fef3879ec"></a>
Dtype&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a1bf366edeb71ae6a76d4177fef3879ec">asum_diff</a> () const</td></tr>
<tr class="memdesc:a1bf366edeb71ae6a76d4177fef3879ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the sum of absolute values (L1 norm) of the diff. <br /></td></tr>
<tr class="separator:a1bf366edeb71ae6a76d4177fef3879ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ea640466fc339a02dabba4e8a1f0de2"><td class="memItemLeft" align="right" valign="top"><a id="a2ea640466fc339a02dabba4e8a1f0de2"></a>
Dtype&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a2ea640466fc339a02dabba4e8a1f0de2">sumsq_data</a> () const</td></tr>
<tr class="memdesc:a2ea640466fc339a02dabba4e8a1f0de2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the sum of squares (L2 norm squared) of the data. <br /></td></tr>
<tr class="separator:a2ea640466fc339a02dabba4e8a1f0de2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2df1894f11323235f9d7c7a1f0fe010f"><td class="memItemLeft" align="right" valign="top"><a id="a2df1894f11323235f9d7c7a1f0fe010f"></a>
Dtype&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a2df1894f11323235f9d7c7a1f0fe010f">sumsq_diff</a> () const</td></tr>
<tr class="memdesc:a2df1894f11323235f9d7c7a1f0fe010f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the sum of squares (L2 norm squared) of the diff. <br /></td></tr>
<tr class="separator:a2df1894f11323235f9d7c7a1f0fe010f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a535dd556e777f2e13b8c7438f40749a0"><td class="memItemLeft" align="right" valign="top"><a id="a535dd556e777f2e13b8c7438f40749a0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a535dd556e777f2e13b8c7438f40749a0">scale_data</a> (Dtype scale_factor)</td></tr>
<tr class="memdesc:a535dd556e777f2e13b8c7438f40749a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scale the blob data by a constant factor. <br /></td></tr>
<tr class="separator:a535dd556e777f2e13b8c7438f40749a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d2d83920d961fff033434347f64a3b0"><td class="memItemLeft" align="right" valign="top"><a id="a6d2d83920d961fff033434347f64a3b0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a6d2d83920d961fff033434347f64a3b0">scale_diff</a> (Dtype scale_factor)</td></tr>
<tr class="memdesc:a6d2d83920d961fff033434347f64a3b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scale the blob diff by a constant factor. <br /></td></tr>
<tr class="separator:a6d2d83920d961fff033434347f64a3b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fce5a816a2b9629686db69108610d93"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a8fce5a816a2b9629686db69108610d93">ShareData</a> (const <a class="el" href="classcaffe_1_1Blob.html">Blob</a> &amp;other)</td></tr>
<tr class="memdesc:a8fce5a816a2b9629686db69108610d93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the data_ shared_ptr to point to the <a class="el" href="classcaffe_1_1SyncedMemory.html" title="Manages memory allocation and synchronization between the host (CPU) and device (GPU). ">SyncedMemory</a> holding the data_ of <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a> other &ndash; useful in <a class="el" href="classcaffe_1_1Layer.html" title="An interface for the units of computation which can be composed into a Net. ">Layer</a>s which simply perform a copy in their Forward pass.  <a href="#a8fce5a816a2b9629686db69108610d93">More...</a><br /></td></tr>
<tr class="separator:a8fce5a816a2b9629686db69108610d93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a004781965b09f94c409cec9a6fc7c35c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcaffe_1_1Blob.html#a004781965b09f94c409cec9a6fc7c35c">ShareDiff</a> (const <a class="el" href="classcaffe_1_1Blob.html">Blob</a> &amp;other)</td></tr>
<tr class="memdesc:a004781965b09f94c409cec9a6fc7c35c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the diff_ shared_ptr to point to the <a class="el" href="classcaffe_1_1SyncedMemory.html" title="Manages memory allocation and synchronization between the host (CPU) and device (GPU). ">SyncedMemory</a> holding the diff_ of <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a> other &ndash; useful in <a class="el" href="classcaffe_1_1Layer.html" title="An interface for the units of computation which can be composed into a Net. ">Layer</a>s which simply perform a copy in their Forward pass.  <a href="#a004781965b09f94c409cec9a6fc7c35c">More...</a><br /></td></tr>
<tr class="separator:a004781965b09f94c409cec9a6fc7c35c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf5af1d79ac66f15dd5ebe504b36efcd"><td class="memItemLeft" align="right" valign="top"><a id="aaf5af1d79ac66f15dd5ebe504b36efcd"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>ShapeEquals</b> (const BlobProto &amp;other)</td></tr>
<tr class="separator:aaf5af1d79ac66f15dd5ebe504b36efcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a128b3c929b6282d8741543044b81894b"><td class="memTemplParams" colspan="2"><a id="a128b3c929b6282d8741543044b81894b"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:a128b3c929b6282d8741543044b81894b"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>Update</b> ()</td></tr>
<tr class="separator:a128b3c929b6282d8741543044b81894b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7da970e54e58626753ddd73955164481"><td class="memTemplParams" colspan="2"><a id="a7da970e54e58626753ddd73955164481"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:a7da970e54e58626753ddd73955164481"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>Update</b> ()</td></tr>
<tr class="separator:a7da970e54e58626753ddd73955164481"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaca009ba67cbcd12c18cf3a766db934f"><td class="memTemplParams" colspan="2"><a id="aaca009ba67cbcd12c18cf3a766db934f"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:aaca009ba67cbcd12c18cf3a766db934f"><td class="memTemplItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memTemplItemRight" valign="bottom"><b>asum_data</b> () const</td></tr>
<tr class="separator:aaca009ba67cbcd12c18cf3a766db934f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7104c5eb03f4307dd65bb098ad4c1a66"><td class="memTemplParams" colspan="2"><a id="a7104c5eb03f4307dd65bb098ad4c1a66"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:a7104c5eb03f4307dd65bb098ad4c1a66"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><b>asum_data</b> () const</td></tr>
<tr class="separator:a7104c5eb03f4307dd65bb098ad4c1a66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba736c86a9d3bdc798bcc6551725f9a9"><td class="memTemplParams" colspan="2"><a id="aba736c86a9d3bdc798bcc6551725f9a9"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:aba736c86a9d3bdc798bcc6551725f9a9"><td class="memTemplItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memTemplItemRight" valign="bottom"><b>asum_diff</b> () const</td></tr>
<tr class="separator:aba736c86a9d3bdc798bcc6551725f9a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1725a104ce88a7eb466f1d1fb3f9cf95"><td class="memTemplParams" colspan="2"><a id="a1725a104ce88a7eb466f1d1fb3f9cf95"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:a1725a104ce88a7eb466f1d1fb3f9cf95"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><b>asum_diff</b> () const</td></tr>
<tr class="separator:a1725a104ce88a7eb466f1d1fb3f9cf95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acac953b71e67c041755151f78a20405f"><td class="memTemplParams" colspan="2"><a id="acac953b71e67c041755151f78a20405f"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:acac953b71e67c041755151f78a20405f"><td class="memTemplItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memTemplItemRight" valign="bottom"><b>sumsq_data</b> () const</td></tr>
<tr class="separator:acac953b71e67c041755151f78a20405f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91285b7a182d4927520b7d1ede18ed20"><td class="memTemplParams" colspan="2"><a id="a91285b7a182d4927520b7d1ede18ed20"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:a91285b7a182d4927520b7d1ede18ed20"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><b>sumsq_data</b> () const</td></tr>
<tr class="separator:a91285b7a182d4927520b7d1ede18ed20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71f00f3e867e4ebccd30fb261f5109a2"><td class="memTemplParams" colspan="2"><a id="a71f00f3e867e4ebccd30fb261f5109a2"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:a71f00f3e867e4ebccd30fb261f5109a2"><td class="memTemplItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memTemplItemRight" valign="bottom"><b>sumsq_diff</b> () const</td></tr>
<tr class="separator:a71f00f3e867e4ebccd30fb261f5109a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4edc021fb188ee25d0113a167858c5ec"><td class="memTemplParams" colspan="2"><a id="a4edc021fb188ee25d0113a167858c5ec"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:a4edc021fb188ee25d0113a167858c5ec"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><b>sumsq_diff</b> () const</td></tr>
<tr class="separator:a4edc021fb188ee25d0113a167858c5ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af90e5b5950b5002ae75243e988a5cfe2"><td class="memTemplParams" colspan="2"><a id="af90e5b5950b5002ae75243e988a5cfe2"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:af90e5b5950b5002ae75243e988a5cfe2"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>scale_data</b> (unsigned int scale_factor)</td></tr>
<tr class="separator:af90e5b5950b5002ae75243e988a5cfe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99de38dc8933f2f6d410eb9cd05aeaa0"><td class="memTemplParams" colspan="2"><a id="a99de38dc8933f2f6d410eb9cd05aeaa0"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:a99de38dc8933f2f6d410eb9cd05aeaa0"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>scale_data</b> (int scale_factor)</td></tr>
<tr class="separator:a99de38dc8933f2f6d410eb9cd05aeaa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf182851c1d42c79928e9fc2fd6a652e"><td class="memTemplParams" colspan="2"><a id="aaf182851c1d42c79928e9fc2fd6a652e"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:aaf182851c1d42c79928e9fc2fd6a652e"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>scale_diff</b> (unsigned int scale_factor)</td></tr>
<tr class="separator:aaf182851c1d42c79928e9fc2fd6a652e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8eab6dc0ff159e72845774db6f032918"><td class="memTemplParams" colspan="2"><a id="a8eab6dc0ff159e72845774db6f032918"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:a8eab6dc0ff159e72845774db6f032918"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>scale_diff</b> (int scale_factor)</td></tr>
<tr class="separator:a8eab6dc0ff159e72845774db6f032918"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af20401e9b2ad7c89aa7c77711f653b7a"><td class="memTemplParams" colspan="2"><a id="af20401e9b2ad7c89aa7c77711f653b7a"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:af20401e9b2ad7c89aa7c77711f653b7a"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>ToProto</b> (BlobProto *proto, bool write_diff) const</td></tr>
<tr class="separator:af20401e9b2ad7c89aa7c77711f653b7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae21cbe8230094762001913bdaee472a7"><td class="memTemplParams" colspan="2"><a id="ae21cbe8230094762001913bdaee472a7"></a>
template&lt;&gt; </td></tr>
<tr class="memitem:ae21cbe8230094762001913bdaee472a7"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>ToProto</b> (BlobProto *proto, bool write_diff) const</td></tr>
<tr class="separator:ae21cbe8230094762001913bdaee472a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a603f1a5472e5fae9ca8fec62f6d5c581"><td class="memItemLeft" align="right" valign="top"><a id="a603f1a5472e5fae9ca8fec62f6d5c581"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>DISABLE_COPY_AND_ASSIGN</b> (<a class="el" href="classcaffe_1_1Blob.html">Blob</a>)</td></tr>
<tr class="separator:a603f1a5472e5fae9ca8fec62f6d5c581"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a5240277a3cea1bc530deca40ca0d0e16"><td class="memItemLeft" align="right" valign="top"><a id="a5240277a3cea1bc530deca40ca0d0e16"></a>
shared_ptr&lt; <a class="el" href="classcaffe_1_1SyncedMemory.html">SyncedMemory</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>data_</b></td></tr>
<tr class="separator:a5240277a3cea1bc530deca40ca0d0e16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9310f9007aa45e529cb6d69d32dbb80c"><td class="memItemLeft" align="right" valign="top"><a id="a9310f9007aa45e529cb6d69d32dbb80c"></a>
shared_ptr&lt; <a class="el" href="classcaffe_1_1SyncedMemory.html">SyncedMemory</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>diff_</b></td></tr>
<tr class="separator:a9310f9007aa45e529cb6d69d32dbb80c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af67df400170ae040ccc680e580b3b578"><td class="memItemLeft" align="right" valign="top"><a id="af67df400170ae040ccc680e580b3b578"></a>
shared_ptr&lt; <a class="el" href="classcaffe_1_1SyncedMemory.html">SyncedMemory</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>shape_data_</b></td></tr>
<tr class="separator:af67df400170ae040ccc680e580b3b578"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5de50aa2b0e48b52d26ae8fe1c7dca82"><td class="memItemLeft" align="right" valign="top"><a id="a5de50aa2b0e48b52d26ae8fe1c7dca82"></a>
vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>shape_</b></td></tr>
<tr class="separator:a5de50aa2b0e48b52d26ae8fe1c7dca82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf06ea13a3a14f77c178a525c35a3ea0"><td class="memItemLeft" align="right" valign="top"><a id="acf06ea13a3a14f77c178a525c35a3ea0"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>count_</b></td></tr>
<tr class="separator:acf06ea13a3a14f77c178a525c35a3ea0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33b722653651763f4cf07c3658a6de33"><td class="memItemLeft" align="right" valign="top"><a id="a33b722653651763f4cf07c3658a6de33"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>capacity_</b></td></tr>
<tr class="separator:a33b722653651763f4cf07c3658a6de33"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename Dtype&gt;<br />
class caffe::Blob&lt; Dtype &gt;</h3>

<p>A wrapper around <a class="el" href="classcaffe_1_1SyncedMemory.html" title="Manages memory allocation and synchronization between the host (CPU) and device (GPU). ">SyncedMemory</a> holders serving as the basic computational unit through which <a class="el" href="classcaffe_1_1Layer.html" title="An interface for the units of computation which can be composed into a Net. ">Layer</a>s, <a class="el" href="classcaffe_1_1Net.html" title="Connects Layers together into a directed acyclic graph (DAG) specified by a NetParameter. ">Net</a>s, and <a class="el" href="classcaffe_1_1Solver.html" title="An interface for classes that perform optimization on Nets. ">Solver</a>s interact. </p>
<p>TODO(dox): more thorough description. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ad686f5ed9994046f2c741bfa81118509"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad686f5ed9994046f2c741bfa81118509">&#9670;&nbsp;</a></span>CanonicalAxisIndex()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Dtype&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classcaffe_1_1Blob.html">caffe::Blob</a>&lt; Dtype &gt;::CanonicalAxisIndex </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>axis_index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the 'canonical' version of a (usually) user-specified axis, allowing for negative indexing (e.g., -1 for the last axis). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">axis_index</td><td>the axis index. If 0 &lt;= index &lt; num_axes(), return index. If -num_axes &lt;= index &lt;= -1, return (num_axes() - (-index)), e.g., the last axis index (num_axes() - 1) if index == -1, the second to last if index == -2, etc. Dies on out of range index. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a64ad51f99e88233f43a21a85ebe10284"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64ad51f99e88233f43a21a85ebe10284">&#9670;&nbsp;</a></span>CopyFrom()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Dtype&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcaffe_1_1Blob.html">caffe::Blob</a>&lt; Dtype &gt;::CopyFrom </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classcaffe_1_1Blob.html">Blob</a>&lt; Dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>copy_diff</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>reshape</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy from a source <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>the <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a> to copy from </td></tr>
    <tr><td class="paramname">copy_diff</td><td>if false, copy the data; if true, copy the diff </td></tr>
    <tr><td class="paramname">reshape</td><td>if false, require this <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a> to be pre-shaped to the shape of other (and die otherwise); if true, Reshape this <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a> to other's shape if necessary </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8674686a97c961b309b4420ead6626b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8674686a97c961b309b4420ead6626b5">&#9670;&nbsp;</a></span>count() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Dtype&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classcaffe_1_1Blob.html">caffe::Blob</a>&lt; Dtype &gt;::count </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>start_axis</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>end_axis</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the volume of a slice; i.e., the product of dimensions among a range of axes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">start_axis</td><td>The first axis to include in the slice.</td></tr>
    <tr><td class="paramname">end_axis</td><td>The first axis to exclude from the slice. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aab573b2a70c26bf3b2ae65e42706003e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab573b2a70c26bf3b2ae65e42706003e">&#9670;&nbsp;</a></span>count() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Dtype&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classcaffe_1_1Blob.html">caffe::Blob</a>&lt; Dtype &gt;::count </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>start_axis</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the volume of a slice spanning from a particular first axis to the final axis. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">start_axis</td><td>The first axis to include in the slice. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac9ce456aa623ff3f4d24225a0db14404"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9ce456aa623ff3f4d24225a0db14404">&#9670;&nbsp;</a></span>Reshape()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcaffe_1_1Blob.html">caffe::Blob</a>&lt; Dtype &gt;::Reshape </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>shape</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change the dimensions of the blob, allocating new memory if necessary. </p>
<p>This function can be called both to create an initial allocation of memory, and to adjust the dimensions of a top blob during <a class="el" href="classcaffe_1_1Layer.html#a7fe981e8af8d93d587acf2a952be563d" title="Adjust the shapes of top blobs and internal buffers to accommodate the shapes of the bottom blobs...">Layer::Reshape</a> or <a class="el" href="classcaffe_1_1Layer.html#ab57d272dabe8c709d2a785eebe72ca57" title="Given the bottom blobs, compute the top blobs and the loss. ">Layer::Forward</a>. When changing the size of blob, memory will only be reallocated if sufficient memory does not already exist, and excess memory will never be freed.</p>
<p>Note that reshaping an input blob and immediately calling <a class="el" href="classcaffe_1_1Net.html#a7a1a6d17347106dd1284b1b6d28cb4e9">Net::Backward</a> is an error; either <a class="el" href="classcaffe_1_1Net.html#a6f6cf9d40637f7576828d856bb1b1826" title="Run Forward and return the result. ">Net::Forward</a> or <a class="el" href="classcaffe_1_1Net.html#a8417af82aa83be45d39aab735bdead1d" title="Reshape all layers from bottom to top. ">Net::Reshape</a> need to be called to propagate the new input shape to higher layers. </p>

</div>
</div>
<a id="a807f4da98e8e0d1f60badb1f540fe010"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a807f4da98e8e0d1f60badb1f540fe010">&#9670;&nbsp;</a></span>shape()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Dtype&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classcaffe_1_1Blob.html">caffe::Blob</a>&lt; Dtype &gt;::shape </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the dimension of the index-th axis (or the negative index-th axis from the end, if index is negative). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>the axis index, which may be negative as it will be "canonicalized" using CanonicalAxisIndex. Dies on out of range index. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8fce5a816a2b9629686db69108610d93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fce5a816a2b9629686db69108610d93">&#9670;&nbsp;</a></span>ShareData()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcaffe_1_1Blob.html">caffe::Blob</a>&lt; Dtype &gt;::ShareData </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classcaffe_1_1Blob.html">Blob</a>&lt; Dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the data_ shared_ptr to point to the <a class="el" href="classcaffe_1_1SyncedMemory.html" title="Manages memory allocation and synchronization between the host (CPU) and device (GPU). ">SyncedMemory</a> holding the data_ of <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a> other &ndash; useful in <a class="el" href="classcaffe_1_1Layer.html" title="An interface for the units of computation which can be composed into a Net. ">Layer</a>s which simply perform a copy in their Forward pass. </p>
<p>This deallocates the <a class="el" href="classcaffe_1_1SyncedMemory.html" title="Manages memory allocation and synchronization between the host (CPU) and device (GPU). ">SyncedMemory</a> holding this <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a>'s data_, as shared_ptr calls its destructor when reset with the "=" operator. </p>

</div>
</div>
<a id="a004781965b09f94c409cec9a6fc7c35c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a004781965b09f94c409cec9a6fc7c35c">&#9670;&nbsp;</a></span>ShareDiff()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classcaffe_1_1Blob.html">caffe::Blob</a>&lt; Dtype &gt;::ShareDiff </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classcaffe_1_1Blob.html">Blob</a>&lt; Dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the diff_ shared_ptr to point to the <a class="el" href="classcaffe_1_1SyncedMemory.html" title="Manages memory allocation and synchronization between the host (CPU) and device (GPU). ">SyncedMemory</a> holding the diff_ of <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a> other &ndash; useful in <a class="el" href="classcaffe_1_1Layer.html" title="An interface for the units of computation which can be composed into a Net. ">Layer</a>s which simply perform a copy in their Forward pass. </p>
<p>This deallocates the <a class="el" href="classcaffe_1_1SyncedMemory.html" title="Manages memory allocation and synchronization between the host (CPU) and device (GPU). ">SyncedMemory</a> holding this <a class="el" href="classcaffe_1_1Blob.html" title="A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...">Blob</a>'s diff_, as shared_ptr calls its destructor when reset with the "=" operator. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/caffe/<a class="el" href="blob_8hpp_source.html">blob.hpp</a></li>
<li>src/caffe/blob.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Aug 3 2017 23:11:21 for Caffe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
